$objWMIServ=GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL",48)
For Each $obj In $objWMIServ
$BootupState=$obj.BootupState
Next
$BootStat=$BootupState
$BootupState=left(ucase($BootupState),6)
if ($BootupState="NORMAL")=0 $SafeMode="Y" endif
Else
$BootStat="Undetermined"
$SafeMode="U"
EndIf
cls
If ($SafeMode="Y")=1 and exist ("*.ide")=1 goto SCAN endif
If ($SafeMode="Y")=1 and exist ("*.ide")=0
BEEP
messagebox("Sophos signature files were not found. The computer is being shutdown so you can download the needed Sophos files in Normal Mode"," Sophos Command Line Scanner ",48,15)
run "%windir%\RUNDLL32.EXE user.exe,ExitWindows"
goto END
endif
gosub "GetFiles"
:SCAN
$result=messagebox ("Do you want to run the Sophos CLS now ? "," Sophos Command Line Scanner ",36,20)
SELECT
CASE ($result="6")=1
; YES
$result=messagebox ("Do you want to scan a particular folder or location ? "," Sophos Command Line Scanner ",36,20)